package com.lzw.controller;

import com.alibaba.fastjson.JSONObject;
import com.lzw.bean.base.TblCompany;
import com.lzw.resultjson.ResultObject;
import com.lzw.service.base.TblCompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @auther: lzw
 * @date: 2021/11/30 - 11 - 30 - 23:28
 * @Description: com.lzw.controller
 */

@RestController
public class EstateController {

    @Autowired
    private TblCompanyService tblCompanyService;

    @RequestMapping("/estate/selectCompany")
    public JSONObject getCompany(){
        List<TblCompany> companys = tblCompanyService.selectCompany();
        return JSONObject.parseObject(JSONObject.toJSONString(new ResultObject("",companys)));
    }
}
